import Vue from 'vue'
import VueRouter from 'vue-router'
import App from './App.vue'
import Index from './views/Index.vue'
import News from './views/News.vue'
import Sports from './views/Sports.vue'
import HomePage from './views/second/HomePage'
import Domestic from './views/second/Domestic'
import Abroad from './views/second/Abroad'

Vue.config.productionTip = false
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect: '/index'
  },
  {
    path: '/index',
    component:Index
  },
  {
    path: '/news',
    component: News,
  },
  {
    path: '/sports',
    component: Sports,
    redirect: '/sports/homepage',
    children: [
      {
        path: 'homepage',
        component:HomePage
      },
      {
        path: 'domestic',
        component:Domestic
      },
      {
        path: 'abroad',
        component:Abroad
      },
    ]
  },
]
const router = new VueRouter({
  routes
})
new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
